package cs6238.test;

import static org.junit.Assert.*;

public class ByteArrayAssert {

	public static void Equal(byte[] expected, byte[] actual){
		if(expected == null){
			assertNull(actual);
			return;
		}
		
		assertNotNull(actual);
		assertEquals(expected.length, actual.length);
		
		for(int i=0; i<expected.length; i++){
			assertEquals(expected[i], actual[i]);
		}
	}
	
	public static void NotEqual(byte[] expected, byte[] actual){
		assertNotNull(expected);
		assertNotNull(actual);
		
		if(expected.length == actual.length){
			for(int i=0; i<expected.length; i++){
				if(expected[i] != actual[i]){
					return;
				}
			}
			
			fail("They are equal!");
		}
	}
}
